﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace MotionPlanning.MotionPlanningPrimitives
{
    public class Node
    {
        protected RoboticSystemPlanningNodeData Value;
        protected List<Edge> Children;
        protected List<Edge> Parents;

        static public Node SpawnGraphicNode()
        {
            return new Node();
        }
        protected Node()
        {
            this.Value = null;
            Children = null;
            Parents = null;
        }
        public List<Edge> get_Children()
        {
            return Children;
        }
        public void set_Children(List<Edge> children)
        {
            Children = children;
        }
        public void add_ChildEdge(Edge child)
        {
            if (Children == null)
                Children = new List<Edge>();
            Children.Add(child);
        }
        public List<Edge> get_Parents()
        {
            return Parents;
        }
        public void set_Parents(List<Edge> parents)
        {
            Parents = parents;
        }
        public void add_ParentEdge(Edge parent)
        {
            if (Parents == null)
                Parents = new List<Edge>();
            Parents.Add(parent);
        }
        public RoboticSystemPlanningNodeData get_Value()
        {
            return Value;
        }
        public void set_Value(RoboticSystemPlanningNodeData value)
        {
            this.Value = value;
        }
    }
}
